home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3dm / audiofile / afGetFrameSize.z / afGetFrameSize
Encoding:
Text File  |  1998-10-20  |  5.9 KB  |  133 lines

  1.  
  2.  
  3.  
  4. aaaaffffGGGGeeeettttFFFFrrrraaaammmmeeeeSSSSiiiizzzzeeee((((3333ddddmmmm))))                                        aaaaffffGGGGeeeettttFFFFrrrraaaammmmeeeeSSSSiiiizzzzeeee((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      afGetFrameSize, afGetVirtualFrameSize - get the track / virtual frame
  10.      size in bytes for a specified audio track from an AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee structure
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiiooooffffiiiilllleeee....hhhh>>>>
  14.  
  15.      iiiinnnntttt aaaaffffGGGGeeeettttFFFFrrrraaaammmmeeeeSSSSiiiizzzzeeee((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt ttttrrrraaaacccckkkk,,,, iiiinnnntttt eeeexxxxtttteeeennnndddd3333ttttoooo4444))))
  16.  
  17.      iiiinnnntttt aaaaffffGGGGeeeettttVVVViiiirrrrttttuuuuaaaallllFFFFrrrraaaammmmeeeeSSSSiiiizzzzeeee((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt ttttrrrraaaacccckkkk,,,, iiiinnnntttt eeeexxxxtttteeeennnndddd3333ttttoooo4444))))
  18.  
  19. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR
  20.      _f_i_l_e         is an AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee structure, previously created by a call
  21.                   to aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm).
  22.  
  23.      _t_r_a_c_k        is an integer which identifies an audio track in _f_i_l_e.
  24.  
  25.      _e_x_t_e_n_d_3_t_o_4   is a integer boolean value (i.e., 0 or 1) indicating whether
  26.                   the routine should extend the value of the frame size for
  27.                   24-bit uncompressed data out to 32 bits.
  28.  
  29.                   Since all currently supported file formats contain exactly
  30.                   one audio track per file, the constant AAAAFFFF____DDDDEEEEFFFFAAAAUUUULLLLTTTT____TTTTRRRRAAAACCCCKKKK
  31.                   should always be used here for now.
  32.  
  33. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  34.      aaaaffffGGGGeeeettttFFFFrrrraaaammmmeeeeSSSSiiiizzzzeeee(((()))) returns the size in bytes of a sample frame in the file
  35.      referenced by _t_r_a_c_k.  aaaaffffGGGGeeeettttVVVViiiirrrrttttuuuuaaaallllFFFFrrrraaaammmmeeeeSSSSiiiizzzzeeee(((()))) returns size in bytes of a
  36.      sample frame in the audio buffer as specified by the current virtual
  37.      format.  See aaaaffffIIIInnnnttttrrrroooo(3dm) for an explanation of virtual format.
  38.  
  39.      In case of error, -1 is returned.
  40.  
  41. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  42.      aaaaffffGGGGeeeettttFFFFrrrraaaammmmeeeeSSSSiiiizzzzeeee(((()))) returns the size of a sample frame in an audio track in
  43.      the file represented by the AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee argument.
  44.  
  45.      aaaaffffGGGGeeeettttVVVViiiirrrrttttuuuuaaaallllFFFFrrrraaaammmmeeeeSSSSiiiizzzzeeee(((()))) does the same for the virtual format for the
  46.      given _t_r_a_c_k, as set by any combination of calls to
  47.      aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt(3dm) and aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllCCCChhhhaaaannnnnnnneeeellllssss(3dm).
  48.  
  49.      For monaural data, a sample frame consists of a single audio sample.  For
  50.      stereo data, a sample frame consists of a <left, right> stereo sample
  51.      pair.
  52.  
  53.      The _e_x_t_e_n_d_3_t_o_4 allows the application to choose, in the case where 24-bit
  54.      uncompressed data is present in the file associated with _t_r_a_c_k, whether
  55.      to return the actual size in bytes of a frame of data in that track (3 *
  56.      number_of_channels) or the size of the frames which will be presented to
  57.      the user (since this will _a_l_w_a_y_s be 4-byte sign-extended integer).  The
  58.      former is useful for informational purposes, but the latter is necessary
  59.      for determining the size of the audio buffer to be handed to
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. aaaaffffGGGGeeeettttFFFFrrrraaaammmmeeeeSSSSiiiizzzzeeee((((3333ddddmmmm))))                                        aaaaffffGGGGeeeettttFFFFrrrraaaammmmeeeeSSSSiiiizzzzeeee((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.      aaaaffffRRRReeeeaaaaddddFFFFrrrraaaammmmeeeessss(3dm).  Note that _e_x_t_e_n_d_3_t_o_4 only applies to 24-bit sample
  75.      width.  It is ignored in all other cases.
  76.  
  77. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  78.      afWriteFrames(3dm), afReadFrames(3dm), afGetChannels(3dm),
  79.      afGetVirtualChannels(3dm), afSetVirtualSampleFormat(3dm)
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.